$(function () {
    var page= $(".numhhh").val();
    
    $.ajax({
        type:"POST",
        url:"/Store/exchangelogList3",
        data:{"page":page},
        dataType:"json",
        success:function (data) {
            var cgstr2 = "";
            $(".exchange_record_table").html("");
            cgstr2 += "<tr>"
            cgstr2 += "<td class=\"left\">商品名称</td>"
            cgstr2 += "<td>消耗钱帮币</td>"
            cgstr2 += "<td>数量</td>"
            cgstr2 += "<td>用户名</td>"
            cgstr2 += "<td>红包状态</td>"
            cgstr2 += "<td style=\"text-align:right;\">订单号</td>"
            cgstr2 += "</tr>"
            $(".exchange_record_table").append(cgstr2);
            var flag = data.flag;
            var cgstr = "";
            if(flag == "F"){
               cgstr += " <tr><td colspan=\"6\">没有数据</td></tr> ";
                $(".exchange_record_table").append(cgstr);
                alert("抱歉，您的用户没有订单信息！");
            }else {
                var Count =data.Count;
                $(".none").val(Count);
                var LdList = $(data.LdList);
                LdList.each(function () {
                    cgstr +=  "<tr>"
                    cgstr += "<td class=\"left\">"+this.commodityName+"</td>"
                    cgstr +=  "<td>"+this.price+"</td>"
                    cgstr +=  "<td>"+this.number+"</td>"
                    cgstr += "<td>"+this.userName+"</td>"
                    cgstr += "<td>未使用</td>"
                    cgstr +=  "<td style=\"text-align:right;\">"+this.orderNum+"</td> </tr>"
                })


                $(".exchange_record_table").append(cgstr);

            }
            
            
            
        },error:function(e){
            alert("cuowu!!!");
            console.log(e);

        }

    });

  





})

